import { ref } from "vue"
import { GetCodeApi } from "@/api/common"
export function useValidateImage() {
    const validate_image_url = ref("")
    const update_validate_image = async () => {
        const t = Math.random() * 9999
        let res = await GetCodeApi({ t: t })
        if (res.success) {
            validate_image_url.value = "data:image/jpeg;base64," + res.entity;
        }
    }
    update_validate_image();
    return {
        validate_image_url,
        update_validate_image
    };
}